package com.bicntech.system.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bicntech.common.constant.UserConstants;
import com.bicntech.common.core.domain.entity.SysDictData;
import com.bicntech.common.core.mapper.BaseMapperPlus;

import java.util.List;

/**
* @author casc1
* @description 针对表【sys_dict_data(字典数据表)】的数据库操作Mapper
* @createDate 2024-03-07 20:43:58
* @Entity com.bicntech.system.entity.SysDictData
*/
public interface SysDictDataMapper  extends BaseMapperPlus<SysDictDataMapper, SysDictData, SysDictData> {
    default List<SysDictData> selectDictDataByType(String dictType) {
        return selectList(new LambdaQueryWrapper<SysDictData>()
                .eq(SysDictData::getStatus, UserConstants.DICT_NORMAL)
                .eq(SysDictData::getDictType, dictType)
                .orderByAsc(SysDictData::getDictSort));
    }
}




